Historical updating oE diff, Revision 1
diff
include datetime.e namespace datetime public function diff(datetime dt1, datetime dt2)
computes the difference, in seconds, between two dates.
Parameters:
- dt1 : the end datetime
- dt2 : the start datetime
Returns:
An atom, the number of seconds elapsed from dt2 to dt1.
Comments:
dt2 is subtracted from dt1, therefore, you can come up with a negative value.
Example 1:
d1 = now() sleep(15) -- sleep for 15 seconds d2 = now() i = diff(d1, d2) -- i is 15
See Also:
Not Categorized, Please Help
|
- diff to current revision, view current revision history, backlinks
- Last modified Sep 04, 2019 by _tom